package com.vinobase.controller.management;



public class CountryForm implements Comparable{

    private Long id;
    private String name;
    private Long cultureId;
    private boolean global;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCultureId() {
        return cultureId;
    }

    public void setCultureId(Long cultureId) {
        this.cultureId = cultureId;
    }

    public boolean isGlobal() {
        return global;
    }

    public void setGlobal(boolean global) {
        this.global = global;
    }

    public int compareTo(Object o) {
         if(!(o instanceof CountryForm)){
            return -9999;
        }
        CountryForm c = (CountryForm)o;
        int cmp =  name.compareTo(c.getName());
        if(cmp==0)
            cmp = id.compareTo(c.getId()) ;
        return cmp;
    }
}
